//
// Created by zhangcc on 2021/5/31.
//

#ifndef REID_INTERFACE_H
#define REID_INTERFACE_H

#include <iostream>
#include <opencv2/opencv.hpp>

#include "fastrt/utils.h"
#include "fastrt/baseline.h"
#include "fastrt/factory.h"
 #include <tracking/src/networkfunc.h>

//class NetworkFeatExtract{
//public:
//    NetworkFeatExtract(){};
//    virtual int init(std::string weights){};
//    virtual std::vector<std::vector<float>> extract(std::vector<cv::Mat> & img)=0;
//    ~NetworkFeatExtract(){};
//protected:
//    void *handle;
//};

class FastREID : public NetworkFeatExtract {
public:
    FastREID(int device_id, int max_batch_size, cv::Size size, bool alway_serialize=false):
    device_id(device_id), max_batch_size(max_batch_size), size(size), alway_serialize(alway_serialize){
        handle=nullptr;
    };

    virtual int init(const std::string& weights);

    virtual std::vector<std::vector<float>> extract(std::vector<cv::Mat> &images);

    ~FastREID();

private:
    int max_batch_size, device_id;
    cv::Size size;
    uint8_t dataType;
    bool alway_serialize;
};

#endif //REID_INTERFACE_H
